global_defs { 
    router_id {{ ansible_hostname }}
}
 
{% if ansible_hostname == 'lb01' %}  
vrrp_script check_nginx {
    script "{{ check_nginx_script }}"
    interval 5
}
vrrp_instance VI_1 {
    state MASTER
    priority 150
    track_script {
        check_nginx
    }
{% else %}  
vrrp_instance VI_1 {
    state BACKUP        
    priority 100
{% endif %}
    interface eth0
    virtual_router_id 50
    advert_int 1
    authentication {    
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        10.0.0.3
    }
}